package com.probox.order.api.domain;

import com.probox.common.core.annotation.Excel;
import com.probox.common.core.utils.money.PriceFormatUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("购物车信息vo")
public class OrderShopCartVo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long cartUid;
    /**
     * 平台ID
     */
    private Long platformUid;
    /**
     * 供应商ID
     */
    @Excel(name = "供应商ID")
    private Long supplierUid;
    /**
     * 商品ID
     */
    private Long proUid;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String proName;
    /**
     * 商品封面图
     */
    @Excel(name = "商品封面图")
    private String proImgUrl;
    @Excel(name = "商品编号")
    @ApiModelProperty(value = "商品编号")
    private String proNo;

    @Excel(name = "商品单位")
    @ApiModelProperty(value = "商品单位")
    private String proUnit;
    /**
     * 商品 SKU ID
     */
    private Long skuUid;
    /**
     * SKU图片
     */
    @Excel(name = "SKU图片")
    private String skuImgUrl;
    /**
     * SKU 描述
     */
    @Excel(name = "SKU 描述")
    private String skuDesc;
    /**
     * 价格
     */
    @Excel(name = "价格")
    private Long price;
    /**
     * 展示价格
     */
    @Excel(name = "展示价格")
    private Long showPrice;
    /**
     * 数量
     */
    @Excel(name = "数量")
    private Long cartNumber;
    /**
     * 合计金额
     */
    @Excel(name = "合计金额")
    private Long cartAmount;
    /**
     * 积分
     */
    @Excel(name = "积分")
    private Long score;
    /**
     * 状态
     */
    @Excel(name = "状态")
    private String cartStatus;
    /**
     * 活动ID
     */
    @Excel(name = "活动ID")
    private Long activityUid;
    /**
     * 活动类型
     */
    @Excel(name = "活动类型")
    private String activityType;
    /**
     * 活动产品ID
     */
    @Excel(name = "活动产品ID")
    private Long activityProUid;

    /**
     * 是否显示在购物车
     */
    private String isShowInCart;

    public String getPriceStr(){
        return PriceFormatUtil.format(price);
    }

    public String getShowPriceStr(){
        return PriceFormatUtil.format(showPrice);
    }

    public String getCartAmountStr(){
        return PriceFormatUtil.format(cartAmount);
    }

}
